// const util = require('../../utils/util.js')

// Page({
//   data: {
//     logs: []
//   },
 
// })
const htmlSnip =
`<div class="div_class">
  <h1>Title</h1>
  <p class="p">
    Life is&nbsp;<i>like</i>&nbsp;a box of
    <b>&nbsp;chocolates</b>.
  </p>
</div>`
Page({
  data: {
    msg: '123',
    htmlSnip ,

  },
  tolog: function (e) {
    console.log("表单值发生了改变" + "   " + e.detail.value)
  },
  readyhandle: function (e) {
    console.log(e)
    console.log('初始化读取')
  },
  btntodo: function () {
    console.log('正在执行todo')
    wx.showActionSheet({
      itemList: ['java','javasciript','javaweb'],
      success :function (res) {
        if (!res.cancel){
          console.log(res)
          console.log(res.tapIndex)
        }
      } 
    })
  },
  showmodel: function () {
    console.log('正在执行showmodel')
    wx.showModal({
      title: '提示',
      cancelColor: 'cancelColor',
      content: '您即将测试modal',
      success: function (res)  {
        console.log(res)
        if (res.confirm) {
          console.log('用户已经确认')
        }
        if (res.cancel) {
          console.log('用户已经取消')
        }
      }
    })
  },
  showtoast: function () {
    console.log('正在实行showtoast')
    wx.showToast({
      title: '成功',
      icon: 'success',
      duration: 1000
    })
  }
})
